\(\int \frac {A+B \log (e (a+b x)^n (c+d x)^{-n})}{(a+b x)^2} \, dx\) [152]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 31, antiderivative size = 97 \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x)^2} \, dx=-\frac {B n}{b (a+b x)}-\frac {B d n \log (a+b x)}{b (b c-a d)}+\frac {B d n \log (c+d x)}{b (b c-a d)}-\frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b (a+b x)} \]

[Out]

-B*n/b/(b*x+a)-B*d*n*ln(b*x+a)/b/(-a*d+b*c)+B*d*n*ln(d*x+c)/b/(-a*d+b*c)+(-A-B*ln(e*(b*x+a)^n/((d*x+c)^n)))/b/
(b*x+a)

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {2548, 46} \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x)^2} \, dx=-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A}{b (a+b x)}-\frac {B d n \log (a+b x)}{b (b c-a d)}+\frac {B d n \log (c+d x)}{b (b c-a d)}-\frac {B n}{b (a+b x)} \]

[In]

Int[(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n])/(a + b*x)^2,x]

[Out]

-((B*n)/(b*(a + b*x))) - (B*d*n*Log[a + b*x])/(b*(b*c - a*d)) + (B*d*n*Log[c + d*x])/(b*(b*c - a*d)) - (A + B*
Log[(e*(a + b*x)^n)/(c + d*x)^n])/(b*(a + b*x))

Rule 46

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x
)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && Lt
Q[m + n + 2, 0])

Rule 2548

Int[((A_.) + Log[(e_.)*((a_.) + (b_.)*(x_))^(n_.)*((c_.) + (d_.)*(x_))^(mn_)]*(B_.))*((f_.) + (g_.)*(x_))^(m_.
), x_Symbol] :> Simp[(f + g*x)^(m + 1)*((A + B*Log[e*((a + b*x)^n/(c + d*x)^n)])/(g*(m + 1))), x] - Dist[B*n*(
(b*c - a*d)/(g*(m + 1))), Int[(f + g*x)^(m + 1)/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f, g, A
, B, m, n}, x] && EqQ[n + mn, 0] && NeQ[b*c - a*d, 0] && NeQ[m, -1] &&  !(EqQ[m, -2] && IntegerQ[n])

Rubi steps \begin{align*} \text {integral}& = -\frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b (a+b x)}+\frac {(B (b c-a d) n) \int \frac {1}{(a+b x)^2 (c+d x)} \, dx}{b} \\ & = -\frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b (a+b x)}+\frac {(B (b c-a d) n) \int \left (\frac {b}{(b c-a d) (a+b x)^2}-\frac {b d}{(b c-a d)^2 (a+b x)}+\frac {d^2}{(b c-a d)^2 (c+d x)}\right ) \, dx}{b} \\ & = -\frac {B n}{b (a+b x)}-\frac {B d n \log (a+b x)}{b (b c-a d)}+\frac {B d n \log (c+d x)}{b (b c-a d)}-\frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b (a+b x)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.92 \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x)^2} \, dx=\frac {-B d n (a+b x) \log (a+b x)+B d n (a+b x) \log (c+d x)-(b c-a d) \left (A+B n+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )}{b (b c-a d) (a+b x)} \]

[In]

Integrate[(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n])/(a + b*x)^2,x]

[Out]

(-(B*d*n*(a + b*x)*Log[a + b*x]) + B*d*n*(a + b*x)*Log[c + d*x] - (b*c - a*d)*(A + B*n + B*Log[(e*(a + b*x)^n)
/(c + d*x)^n]))/(b*(b*c - a*d)*(a + b*x))

Maple [A] (verified)

Time = 5.72 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.34

method result size
parallelrisch \(-\frac {-B x \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) b^{3} d^{2} n -B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) b^{3} c d n +B a \,b^{2} d^{2} n^{2}-B \,b^{3} c d \,n^{2}+A a \,b^{2} d^{2} n -A \,b^{3} c d n}{\left (b x +a \right ) b^{3} d n \left (a d -c b \right )}\) \(130\)
risch \(\frac {B \ln \left (\left (d x +c \right )^{n}\right )}{b \left (b x +a \right )}-\frac {2 A b c -2 B a d n +2 B b c n -2 A a d -2 B a d \ln \left (\left (b x +a \right )^{n}\right )-2 B \ln \left (e \right ) a d -2 B \ln \left (d x +c \right ) a d n +2 B \ln \left (-b x -a \right ) a d n +i B \pi a d \,\operatorname {csgn}\left (i \left (b x +a \right )^{n}\right ) \operatorname {csgn}\left (i \left (d x +c \right )^{-n}\right ) \operatorname {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )+i B \pi a d \,\operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) \operatorname {csgn}\left (i e \left (d x +c \right )^{-n} \left (b x +a \right )^{n}\right )-i B \,\operatorname {csgn}\left (i e \right ) \pi \,\operatorname {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) \operatorname {csgn}\left (i e \left (d x +c \right )^{-n} \left (b x +a \right )^{n}\right ) b c -i B \,\operatorname {csgn}\left (i \left (b x +a \right )^{n}\right ) \pi \,\operatorname {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) \operatorname {csgn}\left (i \left (d x +c \right )^{-n}\right ) b c +2 B \ln \left (-b x -a \right ) b d n x -2 B \ln \left (d x +c \right ) b d n x -i B \pi b c \operatorname {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{3}-i B \pi b c \operatorname {csgn}\left (i e \left (d x +c \right )^{-n} \left (b x +a \right )^{n}\right )^{3}+i B \pi a d \operatorname {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{3}+i B \pi a d \operatorname {csgn}\left (i e \left (d x +c \right )^{-n} \left (b x +a \right )^{n}\right )^{3}+2 B \ln \left (e \right ) b c +2 B \ln \left (\left (b x +a \right )^{n}\right ) b c -i B \pi a d \,\operatorname {csgn}\left (i \left (d x +c \right )^{-n}\right ) \operatorname {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{2}-i B \pi a d \,\operatorname {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) \operatorname {csgn}\left (i e \left (d x +c \right )^{-n} \left (b x +a \right )^{n}\right )^{2}-i B \pi a d \,\operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i e \left (d x +c \right )^{-n} \left (b x +a \right )^{n}\right )^{2}-i B \pi a d \,\operatorname {csgn}\left (i \left (b x +a \right )^{n}\right ) \operatorname {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{2}+i B \pi b c \,\operatorname {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) \operatorname {csgn}\left (i e \left (d x +c \right )^{-n} \left (b x +a \right )^{n}\right )^{2}+i B \pi b c \,\operatorname {csgn}\left (i e \right ) \operatorname {csgn}\left (i e \left (d x +c \right )^{-n} \left (b x +a \right )^{n}\right )^{2}+i B \pi b c \,\operatorname {csgn}\left (i \left (b x +a \right )^{n}\right ) \operatorname {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{2}+i B \pi b c \,\operatorname {csgn}\left (i \left (d x +c \right )^{-n}\right ) \operatorname {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{2}}{2 \left (b x +a \right ) b \left (-a d +c b \right )}\) \(823\)

[In]

int((A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))/(b*x+a)^2,x,method=_RETURNVERBOSE)

[Out]

-(-B*x*ln(e*(b*x+a)^n/((d*x+c)^n))*b^3*d^2*n-B*ln(e*(b*x+a)^n/((d*x+c)^n))*b^3*c*d*n+B*a*b^2*d^2*n^2-B*b^3*c*d
*n^2+A*a*b^2*d^2*n-A*b^3*c*d*n)/(b*x+a)/b^3/d/n/(a*d-b*c)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.10 \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x)^2} \, dx=-\frac {A b c - A a d + {\left (B b c - B a d\right )} n + {\left (B b d n x + B b c n\right )} \log \left (b x + a\right ) - {\left (B b d n x + B b c n\right )} \log \left (d x + c\right ) + {\left (B b c - B a d\right )} \log \left (e\right )}{a b^{2} c - a^{2} b d + {\left (b^{3} c - a b^{2} d\right )} x} \]

[In]

integrate((A+B*log(e*(b*x+a)^n/((d*x+c)^n)))/(b*x+a)^2,x, algorithm="fricas")

[Out]

-(A*b*c - A*a*d + (B*b*c - B*a*d)*n + (B*b*d*n*x + B*b*c*n)*log(b*x + a) - (B*b*d*n*x + B*b*c*n)*log(d*x + c)
+ (B*b*c - B*a*d)*log(e))/(a*b^2*c - a^2*b*d + (b^3*c - a*b^2*d)*x)

Sympy [F(-1)]

Timed out. \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x)^2} \, dx=\text {Timed out} \]

[In]

integrate((A+B*ln(e*(b*x+a)**n/((d*x+c)**n)))/(b*x+a)**2,x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.20 \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x)^2} \, dx=-\frac {{\left (\frac {d e n \log \left (b x + a\right )}{b^{2} c - a b d} - \frac {d e n \log \left (d x + c\right )}{b^{2} c - a b d} + \frac {e n}{b^{2} x + a b}\right )} B}{e} - \frac {B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right )}{b^{2} x + a b} - \frac {A}{b^{2} x + a b} \]

[In]

integrate((A+B*log(e*(b*x+a)^n/((d*x+c)^n)))/(b*x+a)^2,x, algorithm="maxima")

[Out]

-(d*e*n*log(b*x + a)/(b^2*c - a*b*d) - d*e*n*log(d*x + c)/(b^2*c - a*b*d) + e*n/(b^2*x + a*b))*B/e - B*log((b*
x + a)^n*e/(d*x + c)^n)/(b^2*x + a*b) - A/(b^2*x + a*b)

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.14 \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x)^2} \, dx=-\frac {B d n \log \left (b x + a\right )}{b^{2} c - a b d} + \frac {B d n \log \left (d x + c\right )}{b^{2} c - a b d} - \frac {B n \log \left (b x + a\right )}{b^{2} x + a b} + \frac {B n \log \left (d x + c\right )}{b^{2} x + a b} - \frac {B n + B \log \left (e\right ) + A}{b^{2} x + a b} \]

[In]

integrate((A+B*log(e*(b*x+a)^n/((d*x+c)^n)))/(b*x+a)^2,x, algorithm="giac")

[Out]

-B*d*n*log(b*x + a)/(b^2*c - a*b*d) + B*d*n*log(d*x + c)/(b^2*c - a*b*d) - B*n*log(b*x + a)/(b^2*x + a*b) + B*
n*log(d*x + c)/(b^2*x + a*b) - (B*n + B*log(e) + A)/(b^2*x + a*b)

Mupad [B] (verification not implemented)

Time = 1.52 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.00 \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x)^2} \, dx=-\frac {A+B\,n}{x\,b^2+a\,b}-\frac {B\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )}{b\,\left (a+b\,x\right )}-\frac {B\,d\,n\,\mathrm {atan}\left (\frac {b\,c\,2{}\mathrm {i}+b\,d\,x\,2{}\mathrm {i}}{a\,d-b\,c}+1{}\mathrm {i}\right )\,2{}\mathrm {i}}{b\,\left (a\,d-b\,c\right )} \]

[In]

int((A + B*log((e*(a + b*x)^n)/(c + d*x)^n))/(a + b*x)^2,x)

[Out]

- (A + B*n)/(a*b + b^2*x) - (B*log((e*(a + b*x)^n)/(c + d*x)^n))/(b*(a + b*x)) - (B*d*n*atan((b*c*2i + b*d*x*2
i)/(a*d - b*c) + 1i)*2i)/(b*(a*d - b*c))